<!doctype html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>管理后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="/style/x_admin/css/font.css">
    <link rel="stylesheet" href="/style/x_admin/css/xadmin.css">
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/style/x_admin/js/xadmin.js"></script>
    <script type="text/javascript" src="/static/modules.js?v={{style_ver}}"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="index">
<!-- 顶部开始 -->
<div class="container">
    <div class="logo">
        <a href="/backend/dashboard/index" target="mainIframe">PHADMIN后台管理</a></div>
    <div class="left_open">
        <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
    </div>
    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a href="javascript:;">{{admin_name}}</a>
            <dl class="layui-nav-child">
                <dd><a href="/backend/general/profile/password" target="mainIframe">修改密码</a></dd>
                <dd><a href="/backend/index/logout">退出登录</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item to-index">
            <a href="/" target="_blank">前台首页</a></li>
    </ul>
</div>
<!-- 顶部结束 -->
<!-- 左侧菜单开始 -->
<div class="left-nav ant-tree">
    <div id="side-nav">
        <ul id="nav">
            {% if menu %}
            {% for key,item in menu %}
            <li>
                {% set target = '' %}
                {% if is_empty(item['child']) %}
                {% set target = 'target="mainIframe"' %}
                {% endif %}
                <a href="{{item['rule_path']}}" {{target}}>
                    <i class="iconfont left-nav-li" lay-tips="{{item['title']}}">{{item['icon']}}</i>
                    <cite>{{item['title']}}</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
                {% if not is_empty(item['child']) %}
                <ul class="sub-menu">
                    {% for ck,ci in item['child'] %}
                    <li>
                        {% set target2 = '' %}
                        {% if is_empty(ci['child']) %}
                        {% set target2 = 'target="mainIframe"' %}
                        {% endif %}
                        <a href="{{ci['rule_path']}}" {{target2}}>
                            <i class="iconfont">{{ci['icon']}}</i>
                            <cite>{{ci['title']}}</cite>
                            {% if not is_empty(ci['child']) %}
                            <i class="iconfont nav_right">&#xe697;</i>
                            {% endif %}
                        </a>
                        {% if not is_empty(ci['child']) %}
                        <ul class="sub-menu">
                            {% for cck,cci in ci['child'] %}
                            <li>
                                <a href="{{cci['rule_path']}}" target="mainIframe">
                                    <i class="iconfont">{{cci['icon']}}</i>
                                    <cite>{{cci['title']}}</cite>
                                </a>
                            </li>
                            {% endfor %}
                        </ul>
                        {% endif %}
                    </li>
                    {% endfor %}
                </ul>
                {% endif %}
            </li>
            {% endfor %}
            {% else %}
            <li>
                <a href="javascript:;">
                    <i class="iconfont left-nav-li" lay-tips="您无权限">&#xe6b6;</i>
                    <cite>您无权限</cite>
                    <i class="iconfont nav_right">&#xe697;</i>
                </a>
            </li>
            {% endif %}
    </div>
    <div style="height:30px;"></div>
</div>
<!-- 左侧菜单结束 -->
<!-- 右侧主体开始 -->
<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <iframe id="mainIframe" name="mainIframe" src='/backend/dashboard/index' frameborder="0"
                        scrolling="yes" class="x-iframe"></iframe>
            </div>
        </div>
    </div>
</div>
<!-- 右侧主体结束 -->
</body>
</html>
